<template>
  <div class="search">
    <f-form ref="form" :action="api.purchaseorder" :form-key="this.formItem.undefined" >
      <f-form-item label="主键"  name="purchaseorderId"    :value="formItem.purchaseorderId" />
      <f-form-item label="采购订单号"  name="purchaseorderNo"    :value="formItem.purchaseorderNo" />
      <f-form-item label="订单类型"  name="purchaseorderType"    :value="formItem.purchaseorderType" />
      <f-form-item label="订单号"  name="erppurchaseOrderno"    :value="formItem.erppurchaseOrderno" />
      <f-form-item label="订单日期"  name="purchaseorderTime"    :value="formItem.purchaseorderTime" />
      <f-form-item label="采购组织名称"  name="purchasingOrgName"    :value="formItem.purchasingOrgName" />
      <f-form-item label="供应商编码"  name="vendorCode"    :value="formItem.vendorCode" />
      <f-form-item label="供应商名称"  name="vendorName"    :value="formItem.vendorName" />
      <f-form-item label="公司编码"  name="companyCode"    :value="formItem.companyCode" />
      <f-form-item label="公司名称"  name="companyName"    :value="formItem.companyName" />
      <f-form-item label="货币编码"  name="currencyCode"    :value="formItem.currencyCode" />
      <f-form-item label="货币名称"  name="currencyName"    :value="formItem.currencyName" />
      <f-form-item label="货币汇率"  name="currencyRate"    :value="formItem.currencyRate" />
      <f-form-item label="订单金额"  name="totalAmount"    :value="formItem.totalAmount" />
      <f-form-item label="附件ID"  name="uploadfileGroupId"    :value="formItem.uploadfileGroupId" />
      <f-form-item label="订单状态"  name="purchaseorderState"    :value="formItem.purchaseorderState" />
      <f-form-item label="审核状态"  name="purchaseorderFlowState"    :value="formItem.purchaseorderFlowState" />
      <f-form-item label="流程状态"  name="purchaseorderCheckState"    :value="formItem.purchaseorderCheckState" />
      <f-form-item label="ERP同步标识"  name="erpSynState"    :value="formItem.erpSynState" />
      <f-form-item label="创建方式"  name="createType"    :value="formItem.createType" />
      <f-form-item label="供应商查看标识"  name="viewFlag"    :value="formItem.viewFlag" />
      <f-form-item label="ERP返回信息"  name="erpReturnMsg"    :value="formItem.erpReturnMsg" />
      <f-form-item label="先确认后审核标识"  name="checkFirst"    :value="formItem.checkFirst" />
      <f-form-item label="isViewPriceFlag"  name="isViewPriceFlag"    :value="formItem.isViewPriceFlag" />
      <f-form-item label="客户端编码"  name="clientCode"    :value="formItem.clientCode" />
      <f-form-item label="备注"  name="remark"    :value="formItem.remark" />
      <f-form-item label="创建人ID"  name="createId"    :value="formItem.createId" />
      <f-form-item label="创建人姓名"  name="createName"    :value="formItem.createName" />
      <f-form-item label="创建时间"  name="createTime"    :value="formItem.createTime" />
      <f-form-item label="更新人ID"  name="modifyId"    :value="formItem.modifyId" />
      <f-form-item label="更新人姓名"  name="modifyName"    :value="formItem.modifyName" />
      <f-form-item label="更新时间"  name="modifyTime"    :value="formItem.modifyTime" />
      <f-form-item label="采购组编码"  name="purchasingGroupCode"    :value="formItem.purchasingGroupCode" />
      <f-form-item label="采购组名称"  name="purchasingGroupName"    :value="formItem.purchasingGroupName" />
      <f-form-item label="供应商编码ERP"  name="vendorerpCode"    :value="formItem.vendorerpCode" />
      <f-form-item label="供应商可查看标识"  name="isvendorView"    :value="formItem.isvendorView" />
      <f-form-item label="已收货量"  name="receiveQty"    :value="formItem.receiveQty" />
      <f-form-item label="可送数量"  name="cansendQty"    :value="formItem.cansendQty" />
      <f-form-item label="是否撤销审批"  name="isrevocationCheck"    :value="formItem.isrevocationCheck" />
      <f-form-item label="采购组织"  name="purchasingorgCode"    :value="formItem.purchasingorgCode" />
      <f-form-item label="返回值"  name="returnValue"    :value="formItem.returnValue" />
      <f-form-item label="供应商确认时间"  name="vendorconfirmTime"    :value="formItem.vendorconfirmTime" />
      <f-form-item label="国际贸易术语"  name="internationlRradeterm"    :value="formItem.internationlRradeterm" />
      <f-form-item label="国际评论"  name="internationlRradeRemark"    :value="formItem.internationlRradeRemark" />
      <f-form-item label="税率编码"  name="taxrateCode"    :value="formItem.taxrateCode" />
      <f-form-item label="订单发布时间"  name="orderReleaseTime"    :value="formItem.orderReleaseTime" />
      <f-form-item label="是否紧急"  name="urgent"    :value="formItem.urgent" />
      <f-form-item label="合同编码"  name="contractNo"    :value="formItem.contractNo" />
      <f-form-item label="合同名称"  name="contractName"    :value="formItem.contractName" />
      <f-form-item label="项目编码"  name="projectNo"    :value="formItem.projectNo" />
      <f-form-item label="项目名称"  name="projectName"    :value="formItem.projectName" />
      <f-form-item label="工程包号"  name="engineeringNo"    :value="formItem.engineeringNo" />
      <f-form-item label="联系人"  name="contacts"    :value="formItem.contacts" />
      <f-form-item label="联系人电话"  name="contactPhone"    :value="formItem.contactPhone" />
      <f-form-item label="税率"  name="taxrateValue"    :value="formItem.taxrateValue" />
      <f-form-item label="交货地点"  name="deliveryPlace"    :value="formItem.deliveryPlace" />
      <f-form-item label="代购商id"  name="vendoragentId"    :value="formItem.vendoragentId" />
      <f-form-item label="代购商编码"  name="vendoragentCode"    :value="formItem.vendoragentCode" />
      <f-form-item label="代购商名称"  name="vendoragentName"    :value="formItem.vendoragentName" />
      <f-form-item label="项目材料员"  name="projectStuffer"    :value="formItem.projectStuffer" />
      <f-form-item label="材料员邮箱"  name="projectStufferMail"    :value="formItem.projectStufferMail" />
      <f-form-item label="材料员联系电话"  name="projectStufferPhone"    :value="formItem.projectStufferPhone" />
      <f-form-item label="指定收货人"  name="receiver"    :value="formItem.receiver" />
      <f-form-item label="收货人邮箱"  name="receiverMail"    :value="formItem.receiverMail" />
      <f-form-item label="收货人联系电话"  name="receiverPhone"    :value="formItem.receiverPhone" />
      <f-form-item label="预算总金额"  name="budgetAmount"    :value="formItem.budgetAmount" />
      <f-form-item label="承诺占用金额"  name="promiseAmount"    :value="formItem.promiseAmount" />
      <f-form-item label="实际成本金额"  name="actualAmount"    :value="formItem.actualAmount" />
      <f-form-item label="累计变更未税金额"  name="changeAmount"    :value="formItem.changeAmount" />
      <f-form-item label="合同总金额"  name="contractAmount"    :value="formItem.contractAmount" />
      <f-form-item label="折扣总金额"  name="otherCharge"    :value="formItem.otherCharge" />
      <f-form-item label="折扣总金额"  name="discountAmount"    :value="formItem.discountAmount" />
      <f-form-item label="付款条件编码"  name="paymenttypeCode"    :value="formItem.paymenttypeCode" />
      <f-form-item label="付款条件名称"  name="paymenttypeName"    :value="formItem.paymenttypeName" />
      <f-form-item label="需求申请人编码"  name="proposerCode"    :value="formItem.proposerCode" />
      <f-form-item label="需求申请人"  name="proposer"    :value="formItem.proposer" />
      <f-form-item label="订购比例%"  name="subScriptionRatio"    :value="formItem.subScriptionRatio" />
      <f-form-item label="工作范围"  name="workingScope"    :value="formItem.workingScope" />
      <f-form-item label="施工周期"  name="constructionPeriod"    :value="formItem.constructionPeriod" />
      <f-form-item label="指定收货人"  name="receiverCode"    :value="formItem.receiverCode" />
      <f-form-item label="项目材料员编码"  name="projectStufferCode"    :value="formItem.projectStufferCode" />
      <f-form-item label="采购员"  name="purchaseuserName"    :value="formItem.purchaseuserName" />
      <f-form-item label="采购员ID"  name="purchaseuserId"    :value="formItem.purchaseuserId" />
      <f-form-item label="是否有合同编码标识"  name="contractNoflag"    :value="formItem.contractNoflag" />
      <f-form-item label="已有订购金额"  name="subScription"    :value="formItem.subScription" />
      <f-form-item label="累计变更未税金额"  name="changeNotaxAmount"    :value="formItem.changeNotaxAmount" />
      <f-form-item label="合同总金额"  name="contractallNotaxAmount"    :value="formItem.contractallNotaxAmount" />
      <f-form-item label="订单未税金额"  name="orderNotaxAmount"    :value="formItem.orderNotaxAmount" />
      <f-form-item label="auditorIds"  name="auditorIds"    :value="formItem.auditorIds" />
      <f-form-item label="专业分类"  name="materialKindCode"    :value="formItem.materialKindCode" />
      <f-form-item label="更新时间"  name="updateTime"    :value="formItem.updateTime" />
    </f-form>
  </div>
</template>
<script>
  import api from './js/api'
  export default {
    name: 'purchaseorderForm',
    props: {},
    data() {
      return {
        refs:this.$refs,
        api:  Object.assign(api, this.api),
        isAdd: true,//是否是添加模式
        loaded: false,//是否加载完成
        formItem: this.getFormItem()
      }
    },
    methods: {
      getFormItem() {
        return {
          undefined: '',
          purchaseorderId: '',
          purchaseorderNo: '',
          purchaseorderType: '',
          erppurchaseOrderno: '',
          purchaseorderTime: '',
          purchasingOrgName: '',
          vendorCode: '',
          vendorName: '',
          companyCode: '',
          companyName: '',
          currencyCode: '',
          currencyName: '',
          currencyRate: '',
          totalAmount: '',
          uploadfileGroupId: '',
          purchaseorderState: '',
          purchaseorderFlowState: '',
          purchaseorderCheckState: '',
          erpSynState: '',
          createType: '',
          viewFlag: '',
          erpReturnMsg: '',
          checkFirst: '',
          isViewPriceFlag: '',
          clientCode: '',
          remark: '',
          createId: '',
          createName: '',
          createTime: '',
          modifyId: '',
          modifyName: '',
          modifyTime: '',
          purchasingGroupCode: '',
          purchasingGroupName: '',
          vendorerpCode: '',
          isvendorView: '',
          receiveQty: '',
          cansendQty: '',
          isrevocationCheck: '',
          purchasingorgCode: '',
          returnValue: '',
          vendorconfirmTime: '',
          internationlRradeterm: '',
          internationlRradeRemark: '',
          taxrateCode: '',
          orderReleaseTime: '',
          urgent: '',
          contractNo: '',
          contractName: '',
          projectNo: '',
          projectName: '',
          engineeringNo: '',
          contacts: '',
          contactPhone: '',
          taxrateValue: '',
          deliveryPlace: '',
          vendoragentId: '',
          vendoragentCode: '',
          vendoragentName: '',
          projectStuffer: '',
          projectStufferMail: '',
          projectStufferPhone: '',
          receiver: '',
          receiverMail: '',
          receiverPhone: '',
          budgetAmount: '',
          promiseAmount: '',
          actualAmount: '',
          changeAmount: '',
          contractAmount: '',
          otherCharge: '',
          discountAmount: '',
          paymenttypeCode: '',
          paymenttypeName: '',
          proposerCode: '',
          proposer: '',
          subScriptionRatio: '',
          workingScope: '',
          constructionPeriod: '',
          receiverCode: '',
          projectStufferCode: '',
          purchaseuserName: '',
          purchaseuserId: '',
          contractNoflag: '',
          subScription: '',
          changeNotaxAmount: '',
          contractallNotaxAmount: '',
          orderNotaxAmount: '',
          auditorIds: '',
          materialKindCode: '',
          updateTime: ''
        }
      },
      //表单赋值
      setData(data) {
        this.$refs.form.resetFields()
        this.formItem = this.getFormItem()
        if (data && data.undefined) {
          let params={
              undefined:data.undefined
          }
          this.refs['form'].getDetails(params,(data)=>{
             this.formItem=data
             this.loaded = true
          })
          this.isAdd = false
        } else {
          this.loaded = true
        }
      },
      //提交表单
      handleSubmit(callback) {
        this.$refs.form.submit({  }, callback)
      }
    },
    created() {
    },
    components: {}
  }
</script>

<style scoped lang="less" rel="stylesheet/less">

</style>
